<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<script type="text/javascript" src="__PUBLIC__/admin/js/jquery-1.7.2.min.js"></script>
	<link href="__PUBLIC__/admin/css/admin.css" rel="stylesheet" type="text/css" />
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        	<!--Jquery UI插件-->
        	<script type="text/javascript" charset="utf-8">
            		var $URL='__URL__';
        	</script>
	<link href="__PUBLIC__/js/JqueryUi/css/custom-theme/jquery-ui-1.10.3.custom.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="__PUBLIC__/js/JqueryUi/js/jquery-ui-1.10.3.custom.min.js"></script>
	<script type="text/javascript" src="__PUBLIC__/admin/js/admin.js"></script>
        	<script type="text/javascript">
		$(function(){
			$('#typelist').change(function(){
				$typeid=$(this).val();
				if($typeid!=''){
					location='__URL__/?a=type&typeid='+$typeid+'&catid='+<?php echo ($_GET['catid']); ?>;
				}else{
					location='__URL__/?a=index&catid='+<?php echo ($_GET['catid']); ?>;
				}
			});
		});
		function dodel(id,title){
			if(confirm('内容：'+title+"，删除后无法恢复，您确定要删除吗？")){
				window.location="__URL__/?a=del&id="+id;
			}
        		}
	</script>
</head>
<body>
<form action="__URL__/?a=so&catid=<?php echo ($_GET['catid']); ?>" method="post">
<table border="0" cellpadding="0" cellspacing="0" id="list-top" style="margin-left:20px;">
<tr>
	<td>选择栏目：<select name="type" id="typelist" class=""><option value="">全部</option><?php foreach($typelist as $key=>$value){ ?><option value="<?php echo $key ?>" 
					<?php
 if(is_numeric($selected)){ $s=( ($selected)==$key )?"selected":"";echo $s; } if(is_array($selected)){ $s=( in_array($key,($selected)) )?"selected":"";echo $s; } ?>

					 ><?php echo $value ?></option><?php } ?></select></td>
	<td><button type="button" onclick="javascript:_black('__URL__/add/catid/<?php echo ($_GET['catid']); ?>')">发布内容</button></td> 
	<td><button type="button" onclick="javascript:_black('__ROOT__/Index/page/id/<?php echo ($_GET['typeid']); ?>')">预览</button></td>
	<td style="padding-left:15px;">标题：<input name="title" type="text" value="<?php echo ($_GET['title']); ?>" style="width:100px;"/><button type="submit">搜索</button></td>
</tr>
</table>
<table border="0" cellpadding="0" dellspacinng="0" id="listtext">
	<tr id="listt">
        <td class="qx">选择</td>
        <td class="his">内容ID</td>
		<td class="nums">排序</td>
		<td class="title">文章标题</td>
		<td class="his">点击量</td>
		<td class="ren">发布者</td>
		<td class="time">发布时间</td>
		<td class="cz">操作管理</td>
	</tr>
<?php if(is_array($list)): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><tr>
        <td class="qx"><input type="checkbox" class="checkbox" name="checkbox" value="<?php echo ($vo["id"]); ?>"><label></label></td>
        <td class="his"><?php echo ($vo["id"]); ?></td>
		<td class="nums"><input type="text" name="nums[]" value="<?php echo ($vo["nums"]); ?>" /></td>
		<td class="title"><a href="<?php echo ($vo["url"]); ?>" target="_blank"><?php echo ($vo["title"]); ?></td>
		<td class="his"><?php echo ($vo["his"]); ?></td>
		<td class="ren"><?php echo ($vo["zuozhe"]["username"]); ?></td>
		<td class="time"><?php echo (date("Y-m-d H:i",$vo["addtime"])); ?></td>
		<td class="cz"><a href="javascript:_black('__URL__/?a=edit&id=<?php echo ($vo["id"]); ?>&catid=<?php echo ($_GET['catid']); ?>');">修改</a> | <a href="javascript:dodel(<?php echo ($vo["id"]); ?>,'<?php echo ($vo["title"]); ?>')">删除</a></td>
	</tr><?php endforeach; endif; else: echo "" ;endif; ?>
</table>
<table border="0" cellpadding="0" cellspacing="0" id="list-bottom" style="margin-left:20px;">
	<tr>
		<td><button type="button">全选</button></td>
		<td><button type="button">返选</button></td>
		<td><button type="button">审核</button></td>
		<td><button type="button">待审核</button></td>
		<td><button type="button">删除</button></td>
	</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" id="pages">
	<tr><td><?php echo ($page); ?></td></tr>
</table>
</form>		
</body>
</html>